import Main from '../views/main/Main'
import ParentView from '../components/common/ParentView'

export default [
    //登录页
    { path: '/login', name: 'login', meta: { title: 'Login - 登录', hideInMenu: true }, component: () => import('@/views/login/Login.vue') },

    //首页
    {
        path: '/', name: '_home', redirect: '/home', component: Main,
        meta: {arrow: true, menu: false, icon: 'folder', title: '首页'},
        children: [
            {
                path: '/home', name: 'home', meta: { title: '首页', notCache: true, icon: 'folder'},
                component: () => import( '../views/Home')
            }
        ]
    },

    //系统管理
    {
        path: '/system', name: 'system', component: Main,
        meta: {arrow: true, menu: true, icon: 'md-menu', title: '系统管理'},
        children: [
            {
                path: '/system/user', name: 'user',
                meta: {arrow: true, menu: true, icon: 'folder', title: '系统用户管理'},
                component: ParentView,
                children: [
                    {
                        path: '/system/addUser', name: 'addUser',
                        meta: {arrow: true, menu: true, icon: 'folder', title: '新增系统用户'},
                        component: () => import( '../views/AddUser.vue'),
                    }
                ]
            },
            {
                path: '/authority', name: 'authority', component: ParentView,
                meta: {arrow: true, menu: true, icon: 'folder', title: '鉴权管理'},
                children: [
                    {
                        path: '/authority/router', name: 'authorityRouter',
                        meta: {arrow: true, menu: true, icon: 'folder', title: '路由鉴权'},
                        component: () => import( '../views/AuthorityRouter.vue'),
                    }
                ]
            },
            {
                path: '/data/dictionary',name: 'dictionary',
                meta: {arrow: true, menu: true, icon: 'folder', title: '数据字典'},
                component: () => import( '../views/Dictionary.vue')
            },
        ]
    },

    //运营管理
    {
        path: '/about', name: 'about', component: Main,
        meta: {arrow: true, menu: true, icon: 'folder', title: '运营管理'},
        children: [
            {
                path: '/about2', name: 'about2',
                meta: {arrow: true, menu: true, icon: 'folder', title: '运营需求'},
                component: () => import( '../views/About.vue')
            }
        ]
    }
]